import React from 'react';
import {
    HashRouter,   // 决定路由模式 BrowserRouter
    Switch,
    Route   // 路由对象
} from "react-router-dom";
import Home from './pages/Home';
import About from './pages/About';

// 路由管理组件:vueRouter
class Router extends React.Component{
    render(){
        return(
            <HashRouter>
                {/* exact:打破包容性路由规则 */}
                {/* 排他功能 */}
                <Switch>
                    <Route path="/about" component={About} />
                    <Route path="/" component={Home} />
                </Switch>
            </HashRouter>
        );
    }
}

export default Router;